/**
 * 用户相关请求模块
 */
import request from '@/utils/request'

export const searchSuggestionAjax = q => {
  return request({
    method: 'GET',
    url: '/app/v1_0/suggestion',
    params: {
      q
    }
  })
}

// 搜索结果请求
export const searchResultAjax = (params) => {
  return request({
    url: '/app/v1_0/search',
    method: 'GET',
    params
  })
}

// 搜索历史记录
export const searchHistoryAjax = () => {
  return request({
    url: '/app/v1_0/search/histories',
    method: 'GET'
  })
}
